#! /bin/make -f
# @file
# @brief 板级描述层的编译规则
# @author
# + 隐星魂 (Roy Sun) <xwos@xwos.tech>
# @copyright
# + Copyright © 2015 xwos.tech, All Rights Reserved.
# > Licensed under the Apache License, Version 2.0 (the "License");
# > you may not use this file except in compliance with the License.
# > You may obtain a copy of the License at
# >
# >         http://www.apache.org/licenses/LICENSE-2.0
# >
# > Unless required by applicable law or agreed to in writing, software
# > distributed under the License is distributed on an "AS IS" BASIS,
# > WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# > See the License for the specific language governing permissions and
# > limitations under the License.
#

BRD_INCDIRS := ..
BRD_INCDIRS += ../RTD/Base/header
BRD_INCDIRS += ../RTD/Base/include
BRD_INCDIRS += ../RTD/Platform/include
BRD_INCDIRS += ../RTD/Platform/startup/include
BRD_INCDIRS += ../generate/include
BRD_INCDIRS += ../RTD/include

BRD_EOBJS :=

BRD_PREDEF := -DS32K3XX -DS32K312 -DCPU_S32K312 -DCPU_CORTEX_M7
ifeq ($(XWCFG_COMPILER),gcc)
  BRD_PREDEF += -DGCC
endif
ifeq ($(ARCHCFG_FPU),y)
  BRD_PREDEF += -DENABLE_FPU
endif
ifeq ($(CPUCFG_DCACHE),y)
  BRD_PREDEF += -DD_CACHE_ENABLE
endif
ifeq ($(CPUCFG_ICACHE),y)
  BRD_PREDEF += -DI_CACHE_ENABLE
endif
BRD_PREDEF += -DMPU_ENABLE

BRD_AFLAGS := $(BRD_PREDEF)
BRD_AFLAGS_llvm := -Wno-error=unknown-pragmas -Wno-error=sign-conversion
BRD_CFLAGS := $(BRD_PREDEF)
BRD_CFLAGS_llvm := -Wno-error=unknown-pragmas -Wno-error=sign-conversion
BRD_CXXFLAGS := $(BRD_PREDEF)
BRD_CXXFLAGS_llvm := -Wno-error=unknown-pragmas -Wno-error=sign-conversion
BRD_LDFLAGS :=

BRD_CSRCS :=
BRD_ASRCS :=

BRD_CSRCS += init.c firmware.c version.c
BRD_CSRCS += xwac/thd_stack_mempool.c xwac/xwskd_hook.c
